package com.hrt.datasender.datadao.model;

import java.util.Date;

import com.btcode.db.fieldtype.FieldType;
import com.btcode.orm.model.BaseModel;
import com.btcode.orm.model.Field;
import com.btcode.orm.model.IField;

public class BcSerialModel extends BaseModel {

    private static final long serialVersionUID = 1L;

    public static String tableName = "BC_SERIAL";

    public static IField id = new Field(BcSerialModel.class, "ID", FieldType.String, true);

    public static IField comNum = new Field(BcSerialModel.class, "COM_NUM", FieldType.String, false);

    public static IField parity = new Field(BcSerialModel.class, "PARITY", FieldType.String, false);

    public static IField dataBit = new Field(BcSerialModel.class, "DATA_BIT", FieldType.String, false);

    public static IField baudRate = new Field(BcSerialModel.class, "BAUD_RATE", FieldType.String, false);

    public static IField stopBit = new Field(BcSerialModel.class, "STOP_BIT", FieldType.String, false);

    public static IField createtime = new Field(BcSerialModel.class, "CREATETIME", FieldType.DateTime, false);

    public static IField createtimeText = new Field(BcSerialModel.class, "CREATETIME_TEXT", FieldType.String, false);

    public static IField dataProtocol = new Field(BcSerialModel.class, "DATA_PROTOCOL", FieldType.String, false);

    public void setId(String value) {
        setFieldValue(id.getFieldName(), value);
    }

    public String getId() {
        Object value = getFieldValue(BcSerialModel.id.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDataProtocol(String value) {
        setFieldValue(dataProtocol.getFieldName(), value);
    }

    public String getDataProtocol() {
        Object value = getFieldValue(BcSerialModel.dataProtocol.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setComNum(String value) {
        setFieldValue(comNum.getFieldName(), value);
    }

    public String getComNum() {
        Object value = getFieldValue(BcSerialModel.comNum.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setParity(String value) {
        setFieldValue(parity.getFieldName(), value);
    }

    public String getParity() {
        Object value = getFieldValue(BcSerialModel.parity.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setDataBit(String value) {
        setFieldValue(dataBit.getFieldName(), value);
    }

    public String getDataBit() {
        Object value = getFieldValue(BcSerialModel.dataBit.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setBaudRate(String value) {
        setFieldValue(baudRate.getFieldName(), value);
    }

    public String getBaudRate() {
        Object value = getFieldValue(BcSerialModel.baudRate.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setStopBit(String value) {
        setFieldValue(stopBit.getFieldName(), value);
    }

    public String getStopBit() {
        Object value = getFieldValue(BcSerialModel.stopBit.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public void setCreatetime(Date value) {
        setFieldValue(createtime.getFieldName(), value);
    }

    public Date getCreatetime() {
        Object value = getFieldValue(BcSerialModel.createtime.getFieldName());
        Date result = getValueConver().converToDate(value);
        return result;
    }

    public void setCreatetimeText(String value) {
        setFieldValue(createtimeText.getFieldName(), value);
    }

    public String getCreatetimeText() {
        Object value = getFieldValue(BcSerialModel.createtimeText.getFieldName());
        String result = getValueConver().converToString(value);
        return result;
    }

    public String getTableName() {
        return tableName;
    }

    public boolean isNeedCache() {
        return false;
    }

}